package com.ld.security.server.admin.modules.ge.vo;

import com.ld.security.common.core.base.SuperVo;
import com.ld.security.common.mybatis.anno.*;
import com.ld.security.common.mybatis.base.po.PagePo;
import com.ld.security.common.mybatis.constant.GroupTypeConstant;
import com.ld.security.common.mybatis.constant.SqlCondition;
import com.ld.security.server.admin.modules.ge.entity.GeFieldEntity;
import com.ld.security.server.admin.modules.ge.entity.GeLinkEntity;
import com.ld.security.server.admin.modules.ge.entity.GeModelEntity;
import lombok.Data;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

@Data
public class ModelRenderVo implements SuperVo {

    private String viewId;

    private String code;



    @QueryKey
    @SqlKeys(value = {
            @SqlKey(name = "viewId",valueField = "viewId"),
            @SqlKey(name = "code",valueField = "code")
    })

    private GeModelEntity model;


    @QueryKey
    @SqlKey(name = "modelId",valueField = "model.id",value = SqlCondition.eq)

    private List<GeFieldEntity> fields;

    @SqlKey(name = "modelId",valueField = "model.id",value = SqlCondition.eq)
    @QueryKey
    private List<GeLinkEntity> links;



}
